package com.xihuanjun.sdk.entity;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.xihuanjun.sdk.enums.ProductionTransactionType;
import com.xihuanjun.sdk.enums.ProductionTreeType;
import com.xihuanjun.sdk.enums.YNEnum;
import com.xihuanjun.sdk.enums.YNEnum2;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Copyright (C), 2024-08-24
 * FileName: SapOrderItem
 * Author:   溪浣君
 * Date:     2024-08-24 9:12
 * Description: SAP营销单据行
 */
@Data
@NoArgsConstructor
@ToString
@JsonAutoDetect(fieldVisibility= JsonAutoDetect.Visibility.ANY,getterVisibility= JsonAutoDetect.Visibility.NONE)
public class SapOrderItem {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String ItemCode;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Date DocDate;


    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Date ShipDate;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer LineNum;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal Quantity;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal UnitPrice;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal PriceAfterVAT;


    //生产收货用，设置成iNotATree
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private ProductionTreeType TreeType;


    //生产收货用
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private ProductionTransactionType TransactionType;


    @JsonInclude(JsonInclude.Include.NON_NULL)
    private YNEnum2 TaxType;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private YNEnum WTLiable;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private YNEnum TaxOnly;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer ListNum;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal amount;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer TaxPercentagePerRow;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer DiscountPercent;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String VatGroup;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long BaseEntry;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String BaseType;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer BaseLine;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String WarehouseCode;
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String FreeText;


    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String AccountCode;



    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<SapOrderItemBatch> BatchNumbers;


    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String FromWarehouseCode;


    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer RemainingOpenQuantity;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String CostingCode;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String CostingCode2;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String CostingCode3;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String CostingCode4;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String CostingCode5;
}
